package com.wyd.note.business.dict;

import javax.persistence.EntityManager;

public class DictRepositoryImpl {
    private final EntityManager entityManager;

    public DictRepositoryImpl(EntityManager entityManager) {
        this.entityManager = entityManager;
    }

    public Object search() {
        return entityManager.createNativeQuery("select * from dict order by created_at desc limit 10")
                .getResultList();
    }
}
